package com.ssy.lingxi.pay.serviceimpl.assetAccount;

import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.pay.entity.assetAccount.AccountCashOutRecord;
import com.ssy.lingxi.pay.repository.assetAccount.AccountCashOutRecordRepository;
import com.ssy.lingxi.pay.service.assetAccount.IAccountCashOutRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * 会员资金账户
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/7/21
 */
@Service
public class AccountCashOutRecordServiceImpl implements IAccountCashOutRecordService {

    @Autowired
    private AccountCashOutRecordRepository accountCashOutRecordRepository;

    /**
     * 查询提现处理记录列表
     * @param tradeCode
     */
    @Override
    public Page<AccountCashOutRecord> getCheckCashOutList(PageVO pageVO, String tradeCode) {
        Pageable page = PageRequest.of(pageVO.getCurrent() - 1, pageVO.getPageSize());
        return accountCashOutRecordRepository.findByTradeCode(tradeCode, page);
    }
}

